package com.charles.context;

import com.charles.event.ExportEvent;
import lombok.Builder;
import lombok.Data;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author charles
 * @date 2023/5/14 21:51
 */
@Data
@Builder
public class ExportContext {

    private final Map<String, Object> attributes = new ConcurrentHashMap<>();

    public <T> T getAttribute(String name) {
        return (T) getAttributes().get(name);
    }
}
